package top.jybill.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import top.jybill.domain.MyPageInfo;
import top.jybill.domain.ResponseData;
import top.jybill.service.ISysLogService;

@Controller
@RequestMapping("/log")
public class SysController {

  @Autowired
  private ResponseData res;
  @Autowired
  private ISysLogService sysLogService;

  @RequestMapping("/findLogsByPage")
  public @ResponseBody ResponseData findLogsByPage(@RequestBody MyPageInfo page) {
    res.clean();
    res.dataPut("page", sysLogService.findLogsByPage(page));
    res.metaPut("status", 200);
    res.metaPut("msg", "OK");
    return res;
  }

}
